home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Extra 1996 #3 / AmigaPlus_CD-ROM-EXTRA_Nr.3.bin / aminet-spiele / role on / tacl / junglesource / caveobjects next >
Text File  |  1989-12-24  |  6KB  |  303 lines

  1. *
  2. * Sample T.A.C.L. Adventure Game source code © 1989 by Kevin Kelm.
  3. * total of 45 points possible this file
  4. OBJECT Lever
  5.  
  6. NAME Lever, Switch
  7.  
  8. ADJ South
  9.  
  10. ATTRIB
  11.  Pulled N
  12.  FirstPull Y
  13. ENDATTRIB
  14.  
  15. INITROOM Western_Passage
  16.  
  17. CODE
  18.  T There is a large lever in the wall here.
  19.  IF Lever IS Pulled THEN
  20.   T It has been pulled.
  21.  ENDIF
  22. ENDCODE
  23.  
  24. ACTION EXAMINE, LOOK, SEE, VIEW
  25.  T It is a large lever in the southern wall of the passage.
  26.  IF Lever IS Pulled THEN
  27.   T It has been pulled.
  28.   IMAGE Western_Passage Switch_Hall2
  29.   SHOW Switch_Hall2
  30.  ELSE
  31.   IMAGE Western_Passage Switch_Hall1
  32.   SHOW Switch_Hall1
  33.  ENDIF
  34. ENDACT
  35.  
  36. ACTION PULL, FLIP
  37.  IF Lever IS Pulled THEN
  38.   UNSET Lever Pulled
  39.   T With some difficulty, you flip the lever back up.  You hear a distant
  40.   T rumble.
  41.   IMAGE Western_Passage Switch_Hall1
  42.   SHOW Switch_Hall1
  43.  ELSE
  44.   SET Lever Pulled
  45.   T You put all of your weight on the lever and it slowly gives.  There
  46.   T is a rumble in the distance.
  47.   IMAGE Western_Passage Switch_Hall2
  48.   SHOW Switch_Hall2
  49.   IF Lever IS FirstPull THEN
  50.    SCORE 10
  51.    UNSET Lever FirstPull
  52.   ENDIF
  53.  ENDIF
  54. ENDACT
  55.  
  56. ENDOBJ
  57. *
  58. *
  59. *
  60. OBJECT Idol
  61.  
  62. NAME Idol, Statue, Figure
  63.  
  64. ADJ Sacred, Gold, Golden
  65.  
  66. ATTRIB
  67.  FirstGrab Y
  68. ENDATTRIB
  69.  
  70. INITROOM Sacred_Chamber
  71.  
  72. CODE
  73.  IF PLAYER HAS Idol THEN
  74.   T A golden idol
  75.  ELSE
  76.   T There is a golden idol here!!!
  77.  ENDIF
  78.  IMAGE Idol Idol_Img
  79. ENDCODE
  80.  
  81. ACTION EXAMINE, LOOK, SEE, VIEW
  82.  T It is a golden idol from ancient Mayan rites.  It is the object of your
  83.  T mission!
  84.  SHOW Idol_Img
  85. ENDACT 
  86.  
  87. ACTION GET, TAKE, GRAB, STEAL
  88.  IF PLAYER HAS Idol THEN
  89.   T I know you're excited about your find, but you already have the idol!
  90.  ELSE
  91.   T You delicately pick up the idol and examine its every feature;  yup,
  92.   T this is the one you are after!
  93.   GRAB Idol
  94.   IMAGE Altar The_Altar2
  95.   IF Idol IS FirstGrab THEN
  96.    SCORE 25
  97.    UNSET Idol FirstGrab
  98.   ENDIF
  99.   IF SlabPushed = 1 THEN
  100.    IMAGE Sacred_Chamber Sacred4
  101.    IF PLAYER IN Sacred_Chamber THEN
  102.     SHOW Sacred4
  103.    ENDIF
  104.   ELSE
  105.    IMAGE Sacred_Chamber Sacred2
  106.    IF PLAYER IN Sacred_Chamber THEN
  107.     SHOW Sacred2
  108.    ENDIF
  109.   ENDIF
  110.  ENDIF
  111. ENDACT
  112.  
  113. ACTION DROP
  114.  IF PLAYER HAS Idol THEN
  115.   T You know best!  You reluctantly set down the idol.
  116.   DROP Idol
  117.   IF PLAYER IN Sacred_Chamber THEN
  118.    IMAGE Altar The_Altar1
  119.    IF SlabPushed = 1 THEN
  120.     IMAGE Sacred_Chamber Sacred3
  121.     IF PLAYER IN Sacred_Chamber THEN
  122.      SHOW Sacred3
  123.     ENDIF
  124.    ELSE
  125.     IMAGE Sacred_Chamber Sacred1
  126.     IF PLAYER IN Sacred_Chamber THEN
  127.      SHOW Sacred1
  128.     ENDIF
  129.    ENDIF
  130.   ENDIF
  131.  ELSE
  132.   T Even if you had it, you wouldn't want to do that!
  133.  ENDIF
  134. ENDACT
  135.  
  136. ENDOBJECT
  137. *
  138. *
  139. *
  140. OBJECT Altar
  141.  
  142. NAME Altar, Alter
  143.  
  144. ADJ Sacred
  145.  
  146. INITROOM Sacred_Chamber
  147.  
  148. CODE * no description -- described in the room.
  149.  IF Idol IN Sacred_Chamber THEN
  150.   IMAGE Altar The_Altar1
  151.  ELSE
  152.   IMAGE Altar The_Altar2
  153.  ENDIF
  154. ENDCODE
  155.  
  156. ACTION LOOK, SEE, VIEW, EXAMINE
  157.  T It is your standard Mayan sacrifice altar, catalog # 9957E-12.
  158.  IF Idol IN Sacred_Chamber THEN
  159.   SHOW The_Altar1
  160.  ELSE
  161.   SHOW The_Altar2
  162.  ENDIF
  163. ENDACT
  164.  
  165. ENDOBJ
  166. *
  167. *
  168. *
  169. OBJECT Rock
  170.  
  171. NAME Rock, Rocks, Stone, Stones
  172.  
  173. ATTRIB
  174.  Moved
  175. ENDATTRIB
  176.  
  177. INITROOM Pit_Passage
  178.  
  179. CODE
  180.  T A row of stones separate the riverbed from the pit.
  181. ENDCODE
  182.  
  183. ACTION WALK
  184.  IF PREP IS ON THEN
  185.   T As you walk on the stones, you slip and fall.
  186.   RANDOM Temp 2
  187.   IF Temp = 0 THEN
  188.    T You fall into the water, are carried downstream and you get sucked
  189.    T into a water syphon.  You drown.
  190.    CALL BuyTheFarm
  191.   ELSE
  192.    T You fall into the pit and are skewered by the spikes at the bottom.
  193.    CALL BuyTheFarm
  194.   ENDIF
  195.  ELSE
  196.   T I don't understand.
  197.  ENDIF
  198. ENDACT
  199.  
  200. ACTION GET, TAKE, GRAB
  201.  T The stones are too heavy for you to ~ilift out~n.
  202. ENDACT
  203.  
  204. ACTION MOVE, PUSH, DISLODGE, DISTURB, SHIFT, KICK
  205.  IF Rock NOT Moved THEN
  206.   T With great effort, you manage to shift some of the stones and water
  207.   T begins to leak through into the pit!  Before long the pit is filled
  208.   T completely with water!
  209.   EQU PitFull 1
  210.   EQU CrossedWater 1    * not really true, but its easier to deal with
  211.   IMAGE Pit_Passage Pit2
  212.   SHOW Pit2
  213.   SCORE 10
  214.  ELSE
  215.   T There's little point in that now!
  216.  ENDIF
  217. ENDACT
  218.  
  219. ACTION EXAMINE, LOOK, SEE, VIEW
  220.  T The stones provide the boundary between the the riverbed and the pit.
  221. ENDACT
  222.  
  223. ENDOBJECT
  224. *
  225. *
  226. *
  227. OBJECT Log
  228.  
  229. NAME Log, Wood
  230.  
  231. ADJ Old
  232.  
  233. INITROOM Pit_Passage
  234.  
  235. CODE
  236.  T There is an old log across the pit.
  237. ENDCODE
  238.  
  239. ACTION EXAMINE, LOOK, SEE, VIEW
  240.  T The log looks very old and rotten.  I wouldn't walk on it.
  241. ENDACT
  242.  
  243. ACTION CROSS, WALK, USE, GO
  244.  PLACEOBJ Log NoWhere      * presume the log sinks
  245.  T Things go well for the first few steps, but as you approach the center,
  246.  T it begins to crack and sag.  You dive for the opposite edge just as it
  247.  IF PitFull = 0 THEN
  248.   T gives way.  You land on the bottom of the pit almost a whole meter
  249.   T after you land on the spikes.  Yuck!
  250.   CALL BuyTheFarm
  251.  ELSE
  252.   T gives way, and you land in the water.  Though you didn't stay dry, you
  253.   T did manage to survive, which is what counts!  You crawl out on the other
  254.   T side.
  255.   EQU CrossedWater 1
  256.   EQU InConnTunn 1
  257.   Go Connecting_Tunnel
  258.   IMAGE Pit_Passage Pit3
  259.  ENDIF
  260. ENDACT
  261.  
  262. ENDOBJ
  263. *
  264. *
  265. *
  266. OBJECT Pit
  267.  
  268. NAME Pit, Hole, Chasm
  269.  
  270. ADJ Deep, Dark
  271.  
  272. INITROOM Pit_Passage
  273.  
  274. ACTION EXAMINE, LOOK, SEE, VIEW
  275.  IF PitFull = 1 THEN
  276.   T There isn't much to see; it's filled completely with water!
  277.  ELSE
  278.   T You peer over the edge and see long, deadly spikes at the bottom.  You
  279.   T then firmly resolve not to look into the pit anymore.
  280.  ENDIF
  281. ENDACT
  282.  
  283. ACTION SWIM
  284.  IF PitFull = 1 THEN
  285.   IF PREP IS ACROSS THEN
  286.    CALL SwimAcross        * this is a sub to save space...
  287.   ELSIF PREP IS OVER THEN
  288.    CALL SwimAcross        * ...not that we NEED to, it's just...
  289.   ELSIF PREP IS IN THEN
  290.    CALL SwimAcross        * ...a nice thing to do! :^)
  291.   ELSE
  292.    T I'm not sure I understand.
  293.   ENDIF
  294.  ELSE
  295.   T That's not very feasible.  The pit is full of air.
  296.  ENDIF
  297. ENDACT
  298.  
  299. ENDOBJECT
  300. *
  301. * ----- END OF FILE
  302. *
  303.